﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CarHelpDesk.Web.Models.Repositories
{
    public interface ITagRepository
    {
        /// <summary>
        /// List All tags
        /// </summary>
        /// <returns></returns>
        IQueryable<Tag> GetTags();

        /// <summary>
        /// Add new tag in db
        /// </summary>
        /// <param name="tag"></param>
        void CreateTags(Tag tag);
        /// <summary>
        /// check names for tags
        /// </summary>
        /// <param name="names"></param>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool HasAllTagName(string[] names, out int[] ids);
        /// <summary>
        /// 
        ///get all tags for some question
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        IQueryable<Tag> GetTagsByQuestion(int id);
        /// <summary>
        /// Add connection between tag and question
        /// </summary>
        /// <param name="tagIds"></param>
        /// <param name="qu"></param>
        void AddQuestionTags(int[] tagIds, Question qu);
        /// <summary>
        /// Edit connection
        /// </summary>
        /// <param name="tagIds"></param>
        /// <param name="questionID"></param>
        /// <param name="EditorID"></param>
        void EditQuestionTags(int[] tagIds, int questionID, Guid EditorID);

        Tag GetTagByID(int id);

        void Delete(Tag tag);
    }
}
